/// <reference path="./BaseOral.ts" />
namespace wmedu {
    /** 四则运算：先除再减（减法带括号） */
    export class FourOper_DS_B extends BaseOral implements IOralCreater {
        create(opt: IOralOpt) {
            let ops: Enum_OralOp[] = [Enum_OralOp.Div, Enum_OralOp.Sub];
            let brackets: number[] = [1, 2]

            let first = new FourOper_Sub();
            let fres = first.create(opt)
            // 得到结果值
            
            let value = this.mGetRandomInt(opt.mdParamArea);
            let p1 = value * fres.value

            let nums: number[] = [p1].concat(fres.nums);
            let str = BuildUtil.getOralStr(opt.blankSide, opt.blankStr, nums, ops, value, brackets);
            let res: IOralSide = { nums: nums, ops: ops, value: value, str }
            return res;
        }
    }
}